package(default_visibility = ["//visibility:private"])

cc_library(
    name = "numerical",
    srcs = glob(
        ["src/numerical/**/*.cpp"],
    ),
    hdrs = glob(
        [
            "include/geometrycentral/numerical/**/*.h",
            "include/geometrycentral/numerical/**/*.ipp",
        ],
    ),
    defines = select({
        "@platforms//os:windows": [
            "DNOMINMAX",
            "_USE_MATH_DEFINES",
        ],
        "//conditions:default": [],
    }),
    strip_include_prefix = "include",
    visibility = ["//visibility:public"],
    deps = [
        ":utilities",
        "@eigen",
    ],
)

cc_library(
    name = "surface",
    srcs = glob(
        ["src/surface/**/*.cpp"],
        exclude = [
            "src/surface/detect_symmetry.cpp",
            "src/surface/mesh_ray_tracer.cpp",
        ],
    ),
    hdrs = glob(
        [
            "include/geometrycentral/surface/**/*.h",
            "include/geometrycentral/surface/**/*.ipp",
        ],
    ),
    defines = select({
        "@platforms//os:windows": [
            "DNOMINMAX",
            "_USE_MATH_DEFINES",
        ],
        "//conditions:default": [],
    }),
    strip_include_prefix = "include",
    visibility = ["//visibility:public"],
    deps = [
        ":numerical",
        ":utilities",
        "//deps/nanort",
        "@eigen",
        "@happly",
        "@nanoflann",
    ],
)

cc_library(
    name = "pointcloud",
    srcs = glob(
        ["src/pointcloud/**/*.cpp"],
    ),
    hdrs = glob(
        [
            "include/geometrycentral/pointcloud/**/*.h",
            "include/geometrycentral/pointcloud/**/*.ipp",
        ],
    ),
    defines = select({
        "@platforms//os:windows": [
            "DNOMINMAX",
            "_USE_MATH_DEFINES",
        ],
        "//conditions:default": [],
    }),
    strip_include_prefix = "include",
    visibility = ["//visibility:public"],
    deps = [
        ":numerical",
        ":surface",
        ":utilities",
        "@eigen",
        "@happly",
    ],
)

cc_library(
    name = "utilities",
    srcs = glob(
        ["src/utilities/**/*.cpp"],
        exclude = [
            "src/utilities/unit_vector3.cpp",
        ],
    ),
    hdrs = glob(
        [
            "include/geometrycentral/utilities/**/*.h",
            "include/geometrycentral/utilities/**/*.ipp",
        ],
    ),
    defines = select({
        "@platforms//os:windows": [
            "DNOMINMAX",
            "_USE_MATH_DEFINES",
        ],
        "//conditions:default": [],
    }),
    strip_include_prefix = "include",
    visibility = ["//visibility:public"],
    deps = [
        "@eigen",
        "@nanoflann",
    ],
)
